package com.fh.service.system.appuser;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.fh.dao.DaoSupport;
import com.fh.util.PageData;

@Service("registeredService")
public class RegisteredService {
	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	/*
	 *  注册
	 */
	public void save(PageData pd) throws Exception{
		dao.save("RegisteredMapper.save", pd);
	}
	
	/*
	 * 登录
	 */
	public PageData login(PageData pd) throws Exception{
		return (PageData)dao.findForObject("RegisteredMapper.login", pd);
	}
	
	/*
	 * 查询用户
	 */
    public PageData query(PageData pd) throws Exception{
    	return (PageData)dao.findForObject("RegisteredMapper.query", pd);
    }
    
    /*
     * 忘记密码
     */
    public void forget_pwd(PageData pd) throws Exception{
    	 dao.update("RegisteredMapper.forget_pwd", pd);
    }
    
    /*
     * 初级认证
     */
    public void primary_certification(PageData pd) throws Exception{
    	dao.save("RegisteredMapper.primary_certification", pd);
    }
    
    /*
     * 修改用户名
     */
    public void up_name(PageData pd) throws Exception{
    	dao.save("RegisteredMapper.up_name", pd);
    }
    
    public void assets(PageData pd) throws Exception{
    	dao.save("RegisteredMapper.assets", pd);
    }
    
}
